package com.adinnet.admin.system.service.impl;

import com.adinnet.admin.system.mapper.SysUserRoleMapper;
import com.adinnet.admin.system.model.SysUserRole;
import com.adinnet.admin.system.model.vo.SysUserRoleVo;
import com.adinnet.admin.system.service.SysUserRoleService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 用户角色关联表 服务实现类
 * </p>
 *
 * @author sunjianbo
 * @since 2019-05-17
 */
@Service
public class SysUserRoleServiceImpl extends ServiceImpl<SysUserRoleMapper, SysUserRole> implements SysUserRoleService {

    @Override
    public SysUserRoleVo selectRolesByUserId(Integer userId) {
        return baseMapper.selectRolesByUserId(userId);
    }

    @Override
    public List<SysUserRoleVo> getRoles(Integer userId) {
        return baseMapper.getRoles(userId);
    }
}
